package com.zy.openchat.core.model.circle;

import android.os.Parcel;
import android.os.Parcelable;

public class CircleTopicInfo implements Parcelable {

    public long id;
    public String name;
    public int ranking;

    public CircleTopicInfo(long id, String text) {
        this.id = id;
        this.name = text;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.id);
        dest.writeString(this.name);
        dest.writeInt(this.ranking);
    }

    public void readFromParcel(Parcel source) {
        this.id = source.readLong();
        this.name = source.readString();
        this.ranking = source.readInt();
    }

    protected CircleTopicInfo(Parcel in) {
        this.id = in.readLong();
        this.name = in.readString();
        this.ranking = in.readInt();
    }

    public static final Creator<CircleTopicInfo> CREATOR = new Creator<CircleTopicInfo>() {
        @Override
        public CircleTopicInfo createFromParcel(Parcel source) {
            return new CircleTopicInfo(source);
        }

        @Override
        public CircleTopicInfo[] newArray(int size) {
            return new CircleTopicInfo[size];
        }
    };
}
